//
//  ZZFUCProtocolVC.m
//  Pods
//
//  Created by quheng on 2017/9/18.
//
//

#import "BZUCProtocolVC.h"
#import <BZPreHeaderComponent/BZPreHeaderComponent.h>
#import <BZBaseNetWorkSDK/BZBaseRequest.h>
#import <BZBaseWidget/MBProgressHUD+BZBaseToaster.h>

@interface BZUCProtocolVC ()<UIWebViewDelegate>

@end

@implementation BZUCProtocolVC

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.title = @"服务协议";
    UIWebView *webV = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    webV.delegate = self;
    [self.view addSubview:webV];
    
    [MBProgressHUD showMessage:@"加载中...." toView:self.view];
    webV.scalesPageToFit = YES;
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",HTTPHost,@"api/customer/register/aggrement"]]];
    
    [webV loadRequest:request];
    
}


- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
    
    [MBProgressHUD showClueInView:self.view title:@"加载失败..." duration:0.75];
    
}

- (void)webViewDidFinishLoad:(UIWebView *)webView{
    
    [MBProgressHUD hideHUDForView:self.view animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
